﻿<%@ Page Language="C#" MasterPageFile="~/Manager/MasterPage/PageTemplate.Master"
    AutoEventWireup="true" CodeBehind="UserManager.aspx.cs" Inherits="FrameWork.web.Module.FrameWork.UserManager.UserManager" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Page.ResolveUrl("~/") %>Manager/inc/FineMessBox/css/subModal.css" />

    <script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>Manager/inc/FineMessBox/js/common.js"></script>

    <script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>Manager/inc/FineMessBox/js/subModal.js"></script>

    <FrameWorkWebControls:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server"
        HeadOPTxt="用户资料" HeadTitleTxt="用户资料管理">
        <FrameWorkWebControls:HeadMenuButtonItem ButtonName="用户" ButtonPopedom="List" ButtonUrl="Default.aspx"
            ButtonUrlType="Href" ButtonVisible="True" />
    </FrameWorkWebControls:HeadMenuWebControls>
    <FrameWorkWebControls:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
        <FrameWorkWebControls:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="用户帐号">
            <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                <tr>
                    <td class="table_body table_body_NoWidth" style="height: 28px">
                        用户名
                    </td>
                    <td class="table_none table_none_NoWidth" style="height: 28px">
                        <asp:TextBox ID="U_LoginName" title="请输入用户名~20:!" runat="server" CssClass="text_input"></asp:TextBox>
                        <asp:Label ID="U_LoginName_Value" runat="server"></asp:Label>
                    </td>
                    <td class="table_body table_body_NoWidth" style="height: 28px">
                        密码
                    </td>
                    <td class="table_none table_none_NoWidth" style="height: 28px">
                        <asp:TextBox ID="U_Password" title="请输入密码~32:!" runat="server"
                            CssClass="text_input"></asp:TextBox>
                        <asp:Label ID="U_Password_Value" runat="server"></asp:Label><asp:Label ID="labOldPassWord" runat="server" Visible=false></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        用户类型
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:DropDownList ID="U_Type" runat="server">
                            <asp:ListItem Value="1">普通用户</asp:ListItem>
                            <asp:ListItem Value="2">管理员</asp:ListItem>
                            <asp:ListItem Value="0">超级用户</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="U_Type_Value" runat="server"></asp:Label>
                    </td>
                    <td class="table_body table_body_NoWidth">
                        禁止登陆
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:DropDownList ID="U_Status" runat="server">
                            <asp:ListItem Value="0">正常</asp:ListItem>
                            <asp:ListItem Value="1">禁止</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="U_Status_Value" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        用户角色
                    </td>
                    <td class="table_none table_none_NoWidth" colspan="3">
                        <FrameWorkWebControls:MultiListBox ID="MultiListBox1" runat="server" DataTextField="R_RoleName"
                            DataValueField="RoleID" SelectionMode="Single" Rows="4">
                            <FirstListBox>
                                <StyleSheet Width="140px" Height="160px" />
                            </FirstListBox>
                            <SecondListBox>
                                <StyleSheet Width="140px" Height="160px" />
                            </SecondListBox>
                        </FrameWorkWebControls:MultiListBox>
                        <asp:Label ID="Roles_Value" runat="server" Text=""></asp:Label>
                        (超级用户不受用户角色权限限制,默认所有权限.)
                    </td>
                </tr>
                <tr style="display:none">
                    <td class="table_body table_body_NoWidth">
                        用户认证类型
                    </td>
                    <td class="table_none table_none_NoWidth" colspan="3">
                        <asp:DropDownList ID="ddl_U_LoginType" runat="server">
                            <asp:ListItem Text="系统默认" Value=""></asp:ListItem>
                            <asp:ListItem Text="域认证" Value="FrameWork,FrameWork.LdapAuthentication"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="lb_U_LoginType" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </FrameWorkWebControls:TabOptionItem>
        <FrameWorkWebControls:TabOptionItem ID="TabOptionItem2" runat="server" Tab_Name="用户资料"
            Tab_Visible="False">
            <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                <tr>
                    <td class="table_body table_body_NoWidth">
                        用户编号
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_UserNO" title="请输入用户编号~20:" runat="server" CssClass="text_input"></asp:TextBox>
                        <asp:Label ID="U_UserNO_Value" runat="server" Text=""></asp:Label>
                    </td>
                    <td class="table_body table_body_NoWidth" rowspan="4">
                        照片
                    </td>
                    <td class="table_none table_none_NoWidth" rowspan="4">
                        <asp:Image ID="U_PhotoUrl_Value" border="0" runat="server" onclick="javascript:window.open(MaxImgUrl)"
                            Style="cursor: pointer" title="点击放大" />
                        <asp:FileUpload ID="U_PhotoUrl" runat="server" contentEditable="false" CssClass="text_input" />
                    </td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        中文名
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_CName" title="请输入中文名~20:" runat="server" CssClass="text_input"></asp:TextBox>
                        <asp:Label ID="U_CName_Value" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        英文名
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_EName" title="请输入英文名~50:" runat="server" CssClass="text_input"></asp:TextBox>
                        <asp:Label ID="U_EName_Value" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="table_body table_body_NoWidth">
                        公司
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <span id="U_GroupID_Span" runat="server">
                            <input type="hidden" runat="server" name="U_GroupID" id="U_GroupID"><input runat="server"
                                name="U_GroupID_Txt" id="U_GroupID_Txt" class="text_input" readonly>
                            <input type="button" value="选择公司" id="button3" name="buttonselect" onclick="javascript:ShowDepartID()"
                                class="cbutton">
                            <input type="button" value="清除" onclick="javascript:ClearSelect();" class="cbutton" />
                        </span><asp:Label ID="U_GroupID_Value" runat="server" Text=""></asp:Label></td></tr><tr style="display: none">
                    <td class="table_body table_body_NoWidth">
                        性别
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:DropDownList ID="U_Sex" runat="server">
                            <asp:ListItem Value="1">男</asp:ListItem><asp:ListItem Value="0">女</asp:ListItem></asp:DropDownList><asp:Label ID="U_Sex_Value" runat="server" Text=""></asp:Label></td><td class="table_body table_body_NoWidth">
                        出生年月
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_BirthDay" title="请输入出生年月~:date" runat="server" CssClass="text_input"
                            onfocus="javascript:HS_setDate(this);"></asp:TextBox><asp:Label ID="U_BirthDay_Value"
                                runat="server" Text=""></asp:Label></td></tr><tr style="display: none">
                    <td class="table_body table_body_NoWidth">
                        职称
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <FrameWorkWebControls:FieldWebControls ID="FieldWebControls1" runat="server" F_Key="Title"
                            Field_Name="U_Title" LineNum="2" LineNumOn="True" />
                        <asp:Label ID="U_Title_Value" runat="server" Text=""></asp:Label></td><td class="table_body table_body_NoWidth">
                        身份证号码
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_IDCard" title="请输入身份证号码~30:" runat="server" CssClass="text_input"></asp:TextBox><asp:Label
                            ID="U_IDCard_Value" runat="server" Text=""></asp:Label></td></tr><tr>
                    <td class="table_body table_body_NoWidth">
                        联系电话
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_HomeTel" title="请输入联系电话~20:" runat="server" CssClass="text_input"></asp:TextBox><asp:Label
                            ID="U_HomeTel_Value" runat="server" Text=""></asp:Label></td><td class="table_body table_body_NoWidth">
                        手机号
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_MobileNo" title="请输入手机号~15:" runat="server" CssClass="text_input"></asp:TextBox><asp:Label
                            ID="U_MobileNo_Value" runat="server" Text=""></asp:Label></td></tr><tr >
                    <td class="table_body table_body_NoWidth">
                        Email
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_CompanyMail" title="请输入Email~100:email" runat="server" CssClass="text_input"></asp:TextBox><asp:Label
                            ID="U_CompanyMail_Value" runat="server" Text=""></asp:Label></td><td class="table_body table_body_NoWidth">
                      
                    </td>
                    <td class="table_none table_none_NoWidth" style="display:none">
                        <asp:TextBox ID="U_Email" title="请输入邮件地址~100:email" runat="server" CssClass="text_input"></asp:TextBox><asp:Label
                            ID="U_Email_Value" runat="server" Text=""></asp:Label></td></tr><tr style="display:none">
                    <td class="table_body table_body_NoWidth">
                        分机号
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_Extension" title="请输入分机号~10:" runat="server" CssClass="text_input"></asp:TextBox><asp:Label
                            ID="U_Extension_Value" runat="server" Text=""></asp:Label></td><td class="table_body table_body_NoWidth">
                        到职日期
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="U_WorkStartDate" title="请输入到职日期~:date" runat="server" CssClass="text_input"
                            onfocus="javascript:HS_setDate(this);"></asp:TextBox><asp:Label ID="U_WorkStartDate_Value"
                                runat="server" Text=""></asp:Label></td></tr><tr>
                    <td class="table_body table_body_NoWidth">
                        备注说明
                    </td>
                    <td class="table_none table_none_NoWidth" colspan="3">
                        <asp:TextBox ID="U_Remark" title="请输入备注说明~2000:" runat="server" Rows="5" TextMode="MultiLine"
                            CssClass="tex_input"></asp:TextBox><asp:Label ID="U_Remark_Value" runat="server"
                                Text=""></asp:Label></td></tr><tr id="DispTr" runat="server" visible="false">
                    <td class="table_body table_body_NoWidth">
                        最后访问IP
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:Label ID="U_LastIP_Value" runat="server" Text=""></asp:Label></td><td class="table_body table_body_NoWidth">
                        最后操作时间
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:Label ID="U_LastDateTime_Value" runat="server" Text=""></asp:Label></td></tr></table></FrameWorkWebControls:TabOptionItem><FrameWorkWebControls:TabOptionItem ID="TabOptionItem3" runat="server" Tab_Name="个人设定" Visible=false>
            <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                <tr>
                    <td class="table_body">
                        菜单样式
                    </td>
                    <td class="table_none">
                        <asp:DropDownList ID="MenuSink" runat="server">
                            <asp:ListItem Value="0">经典</asp:ListItem><asp:ListItem Value="1">流行(仅限IE)</asp:ListItem><asp:ListItem Value="2" Selected="True">朴素</asp:ListItem><asp:ListItem Value="3">多级菜单</asp:ListItem></asp:DropDownList><asp:Label ID="MenuSink_Txt" runat="server"></asp:Label></td></tr><tr>
                    <td class="table_body">
                        表格样式
                    </td>
                    <td class="table_none">
                        <asp:DropDownList ID="TableSink" runat="server">
                            <asp:ListItem Value="default">经典</asp:ListItem><asp:ListItem Value="blue">深蓝</asp:ListItem><asp:ListItem Value="red">深红</asp:ListItem><asp:ListItem Value="green">深绿</asp:ListItem></asp:DropDownList><asp:Label ID="TableSink_Txt" runat="server"></asp:Label></td></tr><tr>
                    <td class="table_body">
                        页码设定(每页/笔)
                    </td>
                    <td class="table_none">
                        <asp:DropDownList ID="PageSize" runat="server">
                            <asp:ListItem>10</asp:ListItem><asp:ListItem>20</asp:ListItem><asp:ListItem>40</asp:ListItem><asp:ListItem>80</asp:ListItem></asp:DropDownList><asp:Label ID="PageSize_Txt" runat="server"></asp:Label></td></tr></table></FrameWorkWebControls:TabOptionItem><FrameWorkWebControls:TabOptionItem 
            ID="TabOptionItem4" runat="server" Tab_Name="设定货主"><table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                <tr>
                    <td class="table_body" style="width: 139px">货主
                    </td>
                    <td class="table_none" style="width: 921px"><asp:DropDownList ID="dropHZ" 
                            runat="server"></asp:DropDownList><asp:Button 
                            ID="btnHZAdd" runat="server" CssClass="button_bak" Text="添加" 
                            onclick="btnHZAdd_Click" /><asp:Label 
                                ID="labHZ" runat="server"></asp:Label></td></tr><tr id='trHZ' runat=server >
                    <td 
                        class="table_body" style="width: 139px">&nbsp;</td><td class="table_none" 
                        style="width: 921px">
                         <asp:GridView 
                                        ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                        OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound"><Columns><asp:TemplateField 
                                            Visible="False"><ItemTemplate><asp:Label ID="labItemID" runat="server" 
                                                Text='<%# Bind("ID") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField 
                                            HeaderText="货主"><ItemTemplate><asp:Label ID="labItemChnName" runat="server" 
                                                    CommandName="edit" Text='<%# Bind("ShowName") %>'></asp:Label><asp:Label 
                                                    ID="labItemHZID" runat="server" CommandName="edit" Text='<%# Bind("HZID") %>' 
                                                    Visible="false"></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField 
                                            HeaderText=""><ItemTemplate><asp:LinkButton ID="btndel" runat="server" 
                                                    CommandName="del">删除</asp:LinkButton></ItemTemplate></asp:TemplateField></Columns></asp:GridView></td></tr></table></FrameWorkWebControls:TabOptionItem></FrameWorkWebControls:TabOptionWebControls><table width="100%" border="0" cellspacing="1"
        cellpadding="3" align="center" id="PostButton" runat="server">
        <tr>
            <td align="right">
                <asp:Button ID="Button1" runat="server" CssClass="button_bak" Text="确定" OnClick="Button1_Click" />
                <input id="Reset1" class="button_bak" type="reset" value="重填" />
            </td>
        </tr>
    </table>

    <script language="javascript">
       var MaxImgUrl = "<%=MaxImgUrl %>"; 
        rnd.today=new Date(); 

    rnd.seed=rnd.today.getTime(); 

    function rnd() { 

　　　　rnd.seed = (rnd.seed*9301+49297) % 233280; 

　　　　return rnd.seed/(233280.0); 

    }; 

    function rand(number) { 

　　　　return Math.ceil(rnd()*number); 

    }; 
    
    
    function AlertMessageBox(file_name)
    {

	        if (file_name!=undefined){
	            var ShValues = file_name.split('||');
	            if (ShValues[1]!=0)
	            {
	                document.all.<%=this.U_GroupID_Txt.ClientID %>.value=ShValues[0];
	                document.all.<%=this.U_GroupID.ClientID %>.value=ShValues[1];
	            }            
	        }
	         
    }
      function ShowDepartID()
        {
            showPopWin('选择公司','SelectGroup.aspx?'+rand(10000000), 215, 255, AlertMessageBox,true,true)
        }
       
        

      
        
        function ClearSelect()
        {
   	        document.all.<%=this.U_GroupID_Txt.ClientID %>.value="";
            document.all.<%=this.U_GroupID.ClientID %>.value="";
        }
    </script>

</asp:Content>
